package com.ccubee.data.transfer.event.type;

import com.alibaba.otter.canal.protocol.CanalEntry;
import com.ccubee.data.transfer.event.AbstractEventType;
import com.ccubee.data.transfer.event.Cmd;
import com.ccubee.data.transfer.event.IEventType;
import org.springframework.stereotype.Component;

/**
 * 删除
 *
 * @Author ycf
 * @Date 2022/5/22 11:34
 * @Version 1.0
 */
@Component
public class RemoveEventType extends AbstractEventType implements IEventType {
    @Override
    public CanalEntry.EventType evenType() {
        return CanalEntry.EventType.DELETE;
    }

    @Override
    public void cmd(Cmd cmd) {
        cmdSql(cmd, formatRemoveSql(cmd, cmd.getRowData().getBeforeColumnsList()));
    }
}
